package com20230214.xiti;

public class Fibonacci {
    public static void main(String[] args) {
        for (int i = 1; i <= 10; i++) {
            System.out.printf("Fibonacci of %d is: %d\n",i,fibonacci(i));

        }
    }
    static int fibonacci(int num) {
        if ( (num == 1) || (num == 0) )
            return num;
        else
            return fibonacci(num - 1) + fibonacci(num - 2);
    }

}
